import './index.css'

export const TextPropsType = [
    {
      name: 'string',
      label: '文字内容',
      type: 'input',
      default: '默认文字'
    },
    {
      name: 'size',
      label: '文字大小',
      type: 'select',
      default: 'big',
      options: [
        {
          label: '大',
          value: 'big'
        },
        {
          label: '中',
          value: 'middle'
        },
        {
          label: '小',
          value: 'small'
        }
      ]
    },
    {
      name: 'color',
      label: '文字颜色',
      type: 'colorPicker',
      default: '#000000'
    }
  ]

export const Text = ({
    string,
    size,
    color
}) => {
    return <span className={`size-${size}`} style={{color}}>
        {string || '默认文字'}
    </span>
}